package javaBase.javaException;

/**
 * Created by Administrator on 2017/2/23 0023.
 */

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 常量类型定义
 */
public class ExceptionConstants {

    public static final String Code_0000 = "0000";
    public static final String Msg_0000 = "输入参数不合法!";

    public static final String Code_0100 = "0100";
    public static final String Msg_0100 = "";

    public static final String Code_9999 = "9999";
    public static final String Msg_9999 = "其它错误!";

    private static Map<String, String> returnCodeMap = new ConcurrentHashMap<String, String>();

    public static Map<String, String> getReturnCodeMap() {
        if (returnCodeMap.isEmpty()) {
            returnCodeMap.put(Code_0000, Msg_0000);
            returnCodeMap.put(Code_0100, Msg_0100);
            returnCodeMap.put(Code_9999, Msg_9999);
        }
        return returnCodeMap;
    }
}